<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
    <div th:include="navigation::nav">
    </div>
<hr>
    <div style="display: flex; justify-content: space-around">
        <!--  登录-->
        <div style="width: 40%;border: 1px solid red">
            <h2>登录</h2>
            <form action="/home/login" method="post">
                <table width="80%">
                    <tr>
                        <td>账号:</td>
                        <td><input name="phone" type="text"></td>
                    </tr>
                    <tr>
                        <td>密码:</td>
                        <td><input name="pwd" type="password"></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><input type="submit"></td>
                    </tr>
                </table>
                <p th:if="${loginok!=null}" th:text="${loginok}"></p>
            </form>
        </div>
        <!--  功能区-->
        <div style="width: 55%; border: 1px solid black">
            <h2>管理员-功能</h2>
            <div  th:if="${session.DL!=null && session.DL.getRole()=='adm'}">
                <p><a href="/clzadm/show2/1">班级管理</a></p>
                <p><a href="/courseadm/show2/1">课程管理</a></p>
                <p><a href="/teaadm/show">教师管理</a></p>
                <p><a href="/stuadm/show">学生管理</a></p>
                <p><a href="/task/show">排课</a></p>
            </div>
            <h2>学生-功能</h2>
            <div th:if="${session.DL!=null && session.DL.getRole()=='stu'}">
                <p><a href="/stu/go2update">修改密码</a></p>
                <p><a href="/stu/findMyCourse">查询课程</a></p>
                <p><a href="/stu/findMyMark">查成绩</a></p>
            </div>
            <h2>教师-功能</h2>
            <div th:if="${session.DL!=null && session.DL.getRole()=='tea'}">
                <p><a href="/tea/go2update">修改密码</a></p>
                <p><a href="/tea/go2task">登分</a></p>
            </div>
        </div>
    </div>
</body>
</html>